The striatum is an evolutionarily ancient brain structure that receives the most dopamine input of any structure in the brain (41,43). Despite the emergence of frontal neocortical areas, it remains the primary structure responsible for much of implicit reward-based habit learning that is essential for everyday life but can become maladaptive resulting in addiction, compulsive behaviors, and other disorders (11,16,24,31,32). Based on recent findings, we now believe that there may be neural activity patterns in dorsal striatum that are signatures of habit formation. In dorsomedial striatum (DMS), neural responses are seen early in habit learning during decision points of a task (45). In dorsolateral striatum (DLS), neural responses are seen later in learning and concentrated at the initiation and termination of motor habits (9,10,27,45). These patterns are consistent with the roles of DMS and DLS defined by lesion studies (6,15,38,49,50,51,53) and are promising candidates as the neural bases of habit formation; however, it is still unclear what these patterns represent. More importantly, we cannot understand their function unless we consider their role within the corticostriatal circuit and eventually the entire cortico-striatal-pallidal-thalamic circuit, the pimary brain circuit involving striatum (1,42). So far studies have only recorded from isolated sites within these circuits without addressing the how the different regions interact in- task or have focused on exploring the anatomy of the circuit outside of behavior. In order to bridge this gap, we must deconstruct these circuits by defining how the task responses at each point in the circuit emerge. In the proposed studies, I will address whether the previously described DMS and DLS activation patterns generalize across a range of habitual tasks and clarify their relationship to motor habit behavior using a novel lever press sequence task. I will then address how this activity emerges within the corticostriatal circuits. Based on existing knowledge that cortex provides major excitatory input to striatum (1,42), that the cortical areas projecting to DMS and DLS are different (13,35,39), and that corticostriatal plasticity is necessary for habit learning (14,52,53) I hypothesize that cortical input is driving the striatal task responses and tht sculpting of corticostriatal synaptic strengths with experience produces the learning related changes in striatal task responses. To test this hypothesis I will record single unit activity simultaneously in cortical sites and their target striatal sites while using local optogenetic inhibition of the cortical input to identify which of the striatal task responses are dependent upo this input. This combined approach will help me determine not only which striatal task responses are driven by cortical input, but how the activity of neurons in cortex may be driving them. These experiments would be the first to begin constructing a model of the mechanisms of function of corticostriatal circuits within behavior incorporating task and learning dynamics. Ultimately, developing in-depth understanding of habit learning circuits will be key to our long term goal of finding precise circuit manipulations to alleviate debilitating maladaptive behaviors that occur when habits become too fixed.